import network from '../network/index'

export default ({
    state: {
      bargain:[]
    },
    mutations: {
        bargainList(state,items){
            state.bargain = items
        }
    },
    actions: {
        bargainList(context){
            // console.log(12312311111)
            network.getBargain()
            .then(res => {
                console.log(res.data.data.goodsMap)
            context.commit('bargainList',res.data.data.goodsMap)
            })
            .catch(error => {
              console.log(error);
            });
        }
    },
    modules: {

    }
})
  